﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Configuration;

namespace V5_FrameWork.Data {
    public class BaseDebugHelper {
        /// <summary>
        /// 显示列名
        /// </summary>
        /// <param name="dt"></param>
        /// <returns></returns>
        public string DisplayColumn(DataTable dt) {
            string listColumnName = string.Empty;
            foreach (DataColumn dc in dt.Columns) {
                listColumnName += dc.ColumnName + ",";
            }
            return listColumnName;
        }
        /// <summary>
        /// 显示列名
        /// </summary>
        /// <param name="dt"></param>
        /// <returns></returns>
        public string DisplayColumn(DataRowCollection drc) {
            string listColumnName = string.Empty;
            foreach (DataColumn dc in drc[0].Table.Columns) {
                listColumnName += dc.ColumnName + ",";
            }
            return listColumnName;
        }
        /// <summary>
        /// 显示列名
        /// </summary>
        /// <param name="dr"></param>
        /// <returns></returns>
        public string DisplayColumn(DataRow dr) {
            string listColumnName = string.Empty;
            foreach (DataColumn dc in dr.Table.Columns) {
                listColumnName += dc.ColumnName + ",";
            }
            return listColumnName;
        }
    }
}
